public  class Test3_1 {
    public static void main(String[] args) {
        System.out.println("所有的水仙花数为：");
        
        for (int num = 100; num <= 999; num++) {
            int hundreds = num / 100;
            int tens = (num / 10) % 10;
            int units = num % 10;
            
            int sum = hundreds * hundreds * hundreds + 
                      tens * tens * tens + 
                      units * units * units;
            
            if (sum == num) {
                System.out.println(num);
            }
        }
    }
}
